@import "../vars.scss";

.BackToTopButton {
  position: fixed;
  bottom: 64px;
  right: 32px;
  width: 64px;
  height: 64px;
  background: white;
  color: #8385aa;
  visibility: hidden;
  padding: 0;
  opacity: 0;
  border-radius: 50%;
  outline: 0;
  transition: background 0.12s, color 0.12s, visibility 0.3s, opacity 0.3s,
    box-shadow 0.3s;
  box-shadow: 0 8px 16px -2px rgba(0, 32, 64, 0.15);
  cursor: pointer;
  border: 1px solid #c8cbf2;
  z-index: 2;

  @media (min-width: $breakpoint-lg) {
    bottom: 32px;
  }

  &:active {
    box-shadow: inset 0 4px 4px 0px rgba(0, 32, 128, 0.1);
  }

  &.is-visible {
    visibility: visible;
    opacity: 1;
  }

  &__icon {
    width: 32px;
    height: 32px;
  }
}

html:not(.browser-touch) {
  .BackToTopButton {
    &:hover {
      background: #8385aa;
      border-color: #8385aa;
      color: white;
    }
  }
}
